package com.shan;

/**
 * @Author: ShanYuqing
 * @Version: v1.0
 */
public class ArrayTest1 {
    public static void main(String[] args) {
        int[] arr1 = {2,2,23,4,1,7};
       int num = arrayTest(arr1);
        System.out.println(num);
    }

    public static int arrayTest(int[] arr) {

        int max = arr[0];
        for (int i = 1; i < arr.length; i++) {
            if (arr[i] > max) {
                max = arr[i];
            }
        }
        return max;
    }
}
